<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>来查查健康</title>
    <link  rel="stylesheet"  href="css/bootstrap.css">
    <script src="../src/static/jquery.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="js/pinchzoom.js"></script>
    <link rel="stylesheet" href="css/productSupport.css">
</head>
<body>
<div class="container">
    <div class="pinch-zoom">
        <img src="img/HTML_1.png" style="width: 100%;height: 100%"/>
        <img src="img/HTML_2.png" style="width: 100%;height: 100%"/>
        <img src="img/HTML_3.png" style="width: 100%;height: 100%"/>
        <img src="img/HTML_4.png" style="width: 100%;height: 100%"/>
        <img src="img/HTML_5.png" style="width: 100%;height: 100%"/>
        <form role="form"  >
            <div class="form-group">
            </div>
        </form>
        <img src="img/HTML_6.png"  id="mg" style="width: 100%;height: 100%"/>
    </div>
</div>

<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script>
    window.onload=function(){
    alert('本页面分享朋友圈后，可领取一张体验券');
    $.ajax({
        url:'/api/weixinExperienceShareConfig',
        dataType:'json',
        type:'GET',
        success:function (ress) {
            wx.config({
                    debug: false,
                    appId: ress.appid,
                    timestamp: ress.timestamp,
                    nonceStr: ress.noncestr,
                    signature: ress.signature,
                    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage']
            });
            wx.ready(function () {
                console.log('分享前')
                wx.onMenuShareTimeline({
                    title: "来查查智能健康检测仪",
                    link: "http://fb.dingxishebei.com/putIn/experienceShare.html",
                    imgUrl: "http://fb.dingxishebei.com/putIn/img/wxlogo2.jpg",
                    success: function (res) {
                        alert('已分享');
                        window.location.href="http://fb.dingxishebei.com/putIn/share.html";
                        console.log('已分享');
                    },
                    cancel: function (res) {
                        console.log('已取消');
                    },
                    fail: function (res) {
                        console.log(JSON.stringify(res));
                    }
                });

                wx.onMenuShareAppMessage({
                    title: "来查查智能健康检测仪",
                    desc: "快速，全面，一站式智能健康检查设备,在等你！",
                    link: "http://fb.dingxishebei.com/putIn/experienceShare.html",
                    imgUrl: "http://fb.dingxishebei.com/putIn/img/wxlogo2.jpg",
                    success: function (res) {
                        alert('已分享');
                        window.location.href="http://fb.dingxishebei.com/putIn/share.html";
                        console.log('已分享');
                    },
                    cancel: function (res) {
                        console.log('已取消');
                    },
                    fail: function (res) {
                        console.log(JSON.stringify(res));
                    }
                });
            });
        },

        error: function (error) {
            //请求失败  获取的报错信息
            console.log(error);
        }
    })
}
</script>
<script type="text/javascript">
    $(function () {
        $('div.pinch-zoom').each(function () {
            new RTP.PinchZoom($(this), {});
        });
    })
</script>
</body>
</html>